{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "06ce2c3a-fede-4cd8-9651-63e9a4749861",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "03b57b9e-8c04-4fa5-921d-556a701f0ebe",
   "metadata": {},
   "outputs": [],
   "source": [
    "x1 = np.array(12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9052f9b8-cbf2-46d8-b8a9-54127a487114",
   "metadata": {},
   "outputs": [],
   "source": [
    "x1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "85140c89-5d8e-4de7-bb8c-07276df51653",
   "metadata": {},
   "outputs": [],
   "source": [
    "x1.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "88fdf33b-aba3-44a9-a6ee-ec246420f88e",
   "metadata": {},
   "outputs": [],
   "source": [
    "x2 = np.array([1,2,3,4,5])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "43faef9f-30ef-4c0b-99e3-582b09b6e5fb",
   "metadata": {},
   "outputs": [],
   "source": [
    "x2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "061822d7-1702-4bae-9d49-35fb512c4dc8",
   "metadata": {},
   "outputs": [],
   "source": [
    "x2.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "624ac2ab-e4bd-4803-ba23-fdf117274e9f",
   "metadata": {},
   "outputs": [],
   "source": [
    "x3 = np.array([[5,4,5,6,7],\n",
    "              [7,8,9,0,4],\n",
    "              [8,5,3,2,1]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "59b5639c-9adf-49c9-8052-b15500cd1a8e",
   "metadata": {},
   "outputs": [],
   "source": [
    "x3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8ea2ddec-f607-46ff-a2e4-d4d7a03c024a",
   "metadata": {},
   "outputs": [],
   "source": [
    "x3.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8025eaac-7ece-40c9-b281-3fd5d957b5f1",
   "metadata": {},
   "outputs": [],
   "source": [
    "x3.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0a4878b4-1bbd-4f98-9264-a8ae4ee3b3bf",
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.datasets import mnist"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a3c8f0cc-0b25-470b-a297-0cee0f956608",
   "metadata": {},
   "outputs": [],
   "source": [
    "(train_images, train_labels), (test_images, test_labels) = mnist.load_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c7064bf2-c860-49d1-bf94-cded5873d91b",
   "metadata": {},
   "outputs": [],
   "source": [
    "train_images.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1c3e4b33-93be-42cd-882c-4fddf3f46ee1",
   "metadata": {},
   "outputs": [],
   "source": [
    "train_images.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3f9e3753-d2ed-4723-9e6a-e7d790a7ac92",
   "metadata": {},
   "outputs": [],
   "source": [
    "train_images.dtype"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c4824911-9f76-4fb0-b7b1-2d1e05077811",
   "metadata": {},
   "outputs": [],
   "source": [
    "digit = train_images[4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f64295ca-db63-4a41-b013-05ef047c1bfc",
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b44dda31-f381-4436-a8a9-0a6373cea857",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.imshow(digit, camp=plt.cm.binary)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6f1c4562-9c55-46ce-9ffe-8a1e421b8a20",
   "metadata": {},
   "outputs": [],
   "source": [
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bb567377-9849-411a-969f-53ce005aeb71",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
